﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using JTicket.BLL;

namespace JTicket.UI
{
    public partial class JT_CardManager : RoleBase
    {
        protected void Page_Load(object sender, EventArgs e)
        { 
            if (!IsPostBack)
            { 
                this.t1.Text = DateTime.Now.ToString("yyyy-MM-dd");
                this.t2.Text = DateTime.Now.ToString("yyyy-MM-dd");
                bind();
            }
        }
        private void bind()
        {
            try
            {
                int pages = 0;
                int page = 0;
                int len = 50;
                List<Model.D_KaInfo> kaList = DAL.D_KaInfo.GetList(page,len,ref pages);
                this.dg1.DataSource = kaList; 
                this.dg1.DataBind();
            }
            catch (Exception ee)
            {
                Response.Write(ee.Message.ToString());

            }
        }
        protected void dg1_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemIndex == -1) return;
            e.Item.Attributes.Add("bgcolor", "#EFFFDA");
            e.Item.Attributes.Add("style", "cursor:hand");
            e.Item.Attributes.Add("onMouseOver=this.style.backgroundColor", "#DBE3FA");
            e.Item.Attributes.Add("onMouseOut=this.style.backgroundColor", "#F6F6F6");
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

        }
    }
}